package com.example.carrierapp.dao.entity;


import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;

import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.DaoException;
import com.example.carrierapp.dao.DaoSession;
import com.example.carrierapp.dao.SearchHistoryDao;

/**
 * Created by Administrator on 2016/12/30.
 */
@Entity(active = true,nameInDb = "search_history")
public class SearchHistory  {
    @Id(autoincrement = true)
    private Long id;
    private String seachHistory; //搜索历史
    private String seachType; //搜索方式
    /** Used to resolve relations */
    @Generated(hash = 2040040024)
    private transient DaoSession daoSession;
    /** Used for active entity operations. */
    @Generated(hash = 328013218)
    private transient SearchHistoryDao myDao;
    @Generated(hash = 1982306662)
    public SearchHistory(Long id, String seachHistory, String seachType) {
        this.id = id;
        this.seachHistory = seachHistory;
        this.seachType = seachType;
    }
    @Generated(hash = 1905904755)
    public SearchHistory() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getSeachHistory() {
        return this.seachHistory;
    }
    public void setSeachHistory(String seachHistory) {
        this.seachHistory = seachHistory;
    }
    public String getSeachType() {
        return this.seachType;
    }
    public void setSeachType(String seachType) {
        this.seachType = seachType;
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 128553479)
    public void delete() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.delete(this);
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 1942392019)
    public void refresh() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.refresh(this);
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 713229351)
    public void update() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.update(this);
    }
    /** called by internal mechanisms, do not call yourself. */
    @Generated(hash = 1862102362)
    public void __setDaoSession(DaoSession daoSession) {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getSearchHistoryDao() : null;
    }

}
